<% place_form = fields %>
<tr>
	<td class="label_cell_form"><%= label_tag "place_name", Core.human_attribute_name("name") %></td>
	<td class="label_input_form">		
		<%= place_form.text_field :name %>		
		<div id="existents_places"></div>	
	</td>
</tr>
<tr>
	<td class="label_cell_form"><%= label_tag "place_address", Place.human_attribute_name("address") %></td>
	<td class="label_input_form"><%= place_form.text_field :address %></td>
</tr>
<tr>
	<td class="label_cell_form"><%= label_tag "location_full_address", Location.human_attribute_name("full_address") %></td>
	<td class="label_input_form">
		<% place_form.fields_for :location_attributes, @place.location do |location_form| %>			
			<div class="search_field" id="place_location_search_field">		
				<img src="/images/icon_search.png" alt="find" />			
				<%= location_form.text_field :full_address %>
				<div class="separator"><span></span></div>
			</div>							
	    <% end %> 
		<div id="location_name_readable"></div>
		<span id="edit_location_lnk" onclick="changeInputLocation('place_location_attributes_full_address')" class="mini_button_form">edit</span>
		<div style="clear:both;"><span></span></div>
		<div class="mini_tip"><span><%= I18n.t("location.example") %></span></div>
	</td>
</tr>
<tr>
	<td class="label_cell_form"><%= label_tag "place_kinds", Core.human_attribute_name("kinds") %></td>		
	<td class="label_input_form kinds_cell_form">
		<%= render :partial => "/cores/kinds_field", :object => { :core => @place, :form => place_form } %>		
	</td>
</tr>
<tr class="input_advanced">
	<td class="label_cell_form"><%= label_tag "place_description", Core.human_attribute_name("description") %></td>
	<td class="label_input_form"><%= place_form.text_area :description, :rows => 5, :class => "tinymce" %></td>
</tr>
<tr class="input_advanced">
	<td class="label_cell_form"><%= label_tag "place_sites", Core.human_attribute_name("sites") %></td>
	<td class="label_input_form">
  			<% sites = @place.sites.to_s.split(" , ") %>  		
			<div>
				<%= text_field_tag "place[site][]", sites.delete_at(0), :size => 30 %>
				<a rel="place" href="#" class="more_site_lnk mini_button_form" ><%=t "core.more_sites" %></a>
				<%= a = ""; sites.each{ |i| a += "<br />" + text_field_tag("place[site][]",i)}; a; %>
			</div>
	</td>
</tr>
<tr class="input_advanced">
	<td class="label_cell_form"><%= label_tag "place_photo_data", Core.human_attribute_name("photo")  %></td>	
	<td class="label_input_form">
			<%= render :partial => "/cores/image_field", :object => { :form => place_form, 
				:core_name => "place", :core_photo => @place_photo } %>			
	</td>		
</tr>
